﻿@{
    ViewBag.Title = "文章维护";
    Layout = "~/Areas/Admin/Views/Shared/_RightLayout.cshtml";
}
	<form id="listForm" method="get" action="/Admin/Article/List?classid=@Request.QueryString["ClassId"]">
	<div id="toolBar">
        <a class="add" href="/Admin/Article/Edit?classid=@Request.QueryString["ClassId"]"><span>添加</span></a>
		<a class="delete" href="javascript:void()" rel="/Admin/Article/Delete/"><span>删除</span></a>
	    |
        <span>关键字：</span><span><input type="text" name="keywords" value="@Request["Keywords"]"/></span>			
		<input type="submit" value="查找" />
	</div>
	<div id="list">
		<table>
			<tr>
                <th style="width: 25px;" align="center" title="全选/取消">
                    <input type="checkbox" id="select_all" onclick="sel_all()"/>
                </th>
                <th>标题</th>
                @if (Request.QueryString["ClassId"] == "1")
                {
                <th>所属分类</th>
                }
                else
                {
                <th>UrlCode</th>
                }
                <th>首页显示</th>
                <th>已审核</th>
                <th>图片地址</th>
                <th>Tag</th>
                <th class="thDateTime">
                    最后更新时间
                </th>
                <th class="thDateTime">
                    创建时间
                </th>
                <th style="width: 60px;" align="center">
                    操作
                </th>
            </tr>
            @foreach (tb_article data in Model)
            {
            <tr>
                <td align="center"><input type="checkbox" name="ids" value="@data.Id" /></td>
                <td>@data.Title_Zh_cn</td>
                @if (Request.QueryString["ClassId"] == "1")
                {
                <td>@(CacheHelper<tb_subclass>.GetById(data.ClassId).GetName())</td>
                }
                else
                {
                <td>@data.UrlCode</td>
                }
                <td align="center">@PageControl.RenderBooleanString(data.IsHot)</td>
                <td align="center">@PageControl.RenderBooleanString(data.HasAudited)</td>
                <td>@data.PicUrl</td>
                <td>@data.KeyWord_Zh_cn</td>
                <td class="tdDateTime">@data.UpdateDate</td>
                <td class="tdDateTime">@data.CreateDate</td>
                <td>
                    <a href="/Admin/Article/Edit/@(data.Id)?classid=@Request.QueryString["ClassId"]" title="修改文章" >修改</a>
                    <a href="/Article/@data.Id" title="查看文章详细信息" target="_blank" >详细</a>
                </td>
            </tr>
            }
		</table>
	</div>
	@Html.Raw(PageControl.Render(Model))
	</form>
